package effective_java.design_pattern.decorator;

/**
 * @author Verlet
 * @date 2023-09-06 01:32
 */
public class Main {

    public static void main(String[] args) {
        FriedRice friedRice = new FriedRice();
        System.out.println(friedRice.getDesc()+":"+friedRice.cost()+"元");
        Egg egg = new Egg(friedRice);
        System.out.println(egg.getDesc()+":"+egg.cost()+"元");
        Egg egg2 = new Egg(egg);
        System.out.println(egg2.getDesc()+":"+egg2.cost()+"元");
        Bacon bacon = new Bacon(egg2);
        System.out.println(bacon.getDesc()+":"+bacon.cost()+"元");
    }
}
